<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');?>
<div class="subnav">
  <h2 class="title-1 line-x f14 fb blue lh28">报名管理--<?php echo $info['title'];?><?php echo L('field_manage');?>&nbsp;&nbsp;&nbsp;&nbsp;<a href="?m=sign_up&c=reg&a=init" style="font-size:14px;color: #0000FF"><em>返回上一级</em></a>
  &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" onclick="refreshData(4);"><em>刷新数据</em></a>
  </h2>
  
<div class="content-menu ib-a blue line-x"><a class="add fb" href="javascript:;" onClick="<?=$big_menu1?>"><em><?php echo L('add_field');?></em></a>
　<a class="on" href="?m=sign_up&c=reg&a=fields&id=<?php echo $id?>"><em><?php echo L('manage_field');?></em></a>
</div></div>
<div class="pad-lr-10">
<form name="myform" action="?m=sign_up&c=reg&a=listorder" method="post">
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
			<th width="70"><?php echo L('listorder')?></th>
            <th width="50">ID</th>
			<th width="200"><?php echo L('column_name');?></th>
			<th width="100"><?php echo L('column_name_en');?></th>
			<th width="100"><?php echo L('column_image');?></th>
			<th><?php echo L('column_description');?></th>
			<th width="80" align='center'><?php echo L('column_type');?></th> 
            <th width="50" align='center'><?php echo L('have_to');?></th>
			<th width="150" align='center'><?php echo L('operations_manage');?></th>
            </tr>
        </thead>
    <tbody class="td-line">
	<?php
	if (!empty($lists)){
	foreach($lists as $r) {
	?>
    <tr>
		<td align='center' width='70'><input name='listorders[<?php echo $r['id']?>]' type='text' size='3' value='<?php echo $r['sort']?>' class='input-text-c'></td>
		<td align='center'><?php echo $r['id']?></td>
		<td align='center'><?php echo $r['column_name']?></td>
		<td align='center'><?php echo $r['column_name_en']?></td>
		<td align='center'><?php if ($r['column_image']){ ?><img src="<?php echo $r['column_image'];?>" height="60"/><?php }else{echo '<font color="red">（未设置）</font>';}?></td>
		<td align='center'><?php echo $r['column_description']?$r['column_description']:'<font color="red">（未设置）</font>';?></td>
		<td align='center'><?php echo $types[$r['column_type']]?></td>
		<td align='center'><?php if ($r['have_to'] == 1){echo '是';}else{ echo '否';}?></td>
		<td align='center'> <a href="javascript:edit('<?php echo $r['id']?>','<?php echo addslashes($r['column_name']);?>')"><?php echo L('edit');?></a> | 
		<a href="javascript:confirmurl('?m=sign_up&c=reg&a=delete_field&id=<?php echo $r['id']?>','<?php echo L('confirm',array('message'=>$r['column_name']))?>')"><?php echo L('delete')?></a> </td>
	</tr>
	<?php } 
	} else {
		echo "<tr><td colspan='8' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>";
		}?>
    </tbody>
    </table>
   <div class="btn"><input type="submit" class="button" name="dosubmit" value="<?php echo L('listorder');?>" /></div></div>
</form>
<script type="text/javascript">
	function edit(id, name) {
		window.top.art.dialog({id:'edit'}).close();
		window.top.art.dialog({title:'修改《'+name+'》',id:'edit',iframe:'?m=sign_up&c=reg&a=edit_field&id='+id,width:'660',height:'420'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
	}
</script>
</div>
</body>
</html>
